import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Map } from 'immutable';
import AccountingSubjectCom from 'components/AccountingSubject/AccountingSubjectCom';
import { PayActions } from 'store/actionCreators';
import { type State } from 'store';

type Props = { data: Array<any>, visible: boolean, type: string };
class AccountingSubjectComContainer extends Component<Props> {
  handleOk: () => {};
  handleCancel: () => {};
  render() {
    const { data, visible, type, forms } = this.props;
    return (
      <AccountingSubjectCom
        data={data}
        visible={visible}
        type={type}
        Forms={forms}
        handleOk={this.handleOk}
        handleCancel={PayActions.closeModledlg}
      />
    );
  }
}

const mapStateToProps = ({ pay }: State) => ({
  data: pay.acounts.data,
  visible: pay.acounts.modelDlg.visible,
  type: pay.acounts.modelDlg.type,
  forms: pay.acounts.modelDlg.forms,
});

const mapDispatchToProps = dispatch => ({});

export default connect(
  mapStateToProps,
  mapDispatchToProps,
)(AccountingSubjectComContainer);
